Skip to content

feat: simplify constant calls to poseidon2_permutation, schnorr_verify and embedded_curve_add#5140

Merged
TomAFrench merged 25 commits intomasterfrom
tf/more-comptime-optimization
Aug 28, 2024
Merged

feat: simplify constant calls to poseidon2_permutation, schnorr_verify and embedded_curve_add#5140
TomAFrench merged 25 commits intomasterfrom
tf/more-comptime-optimization

Conversation

@TomAFrench
Copy link
Copy Markdown
Member

Description

Problem*

Resolves

Summary*

Now that we have rust implementations of all blackbox functions, we can perform any pedersen operations with constant inputs at compile-time. We couldn't do this before as it would have required an async initialisation step for the wasm compiler but that is no longer an issue.

I've done this by using compile-time flags to select the blackbox solver we're using. If nargo is compiled with a non-bn254 field then it will not perform these optimizations. The ultimate plan is for this solver to be specified by the end user in a similar way to the way the field definition is.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants